console.log('module B')

const sleep = (timeout) => {
    return new Promise((resolve, reject) => {
        setTimeout(() => {
            resolve(timeout/1000 + 's 后执行打印a')
        }, timeout);
    })
}
// 如果不加 async / await 返回 Promise Pending
/* Promise {<pending>} */ 
/* Promise[[PromiseStatus]]: "resolved"[[PromiseValue]]: "2s 后执行打印a" */

async function fetch(){
    let a = await sleep(2000)
    console.log(a)
}
fetch()